Multiprocessor devices use multiple processors to perform a variety of tasks. The tasks may all be related to the same program, or they may relate to different programs. For example, if the program is a game on racing, one task running on one processor may be responsible for calculating a car's speed and position while another task may be responsible for determining how to draw the three-dimensional car on a two-dimensional computer screen. It may be useful to break these two tasks into separate programs running in parallel because the car may be changing positions more often than the associated gaming device can display those positions. By running in parallel with access to some common memory, the two tasks can operate at independent speeds without affecting the performance of the other. As is known to those of ordinary skill in the art, a program may actually be a collection of programs relating to a particular application. For example, a racing game application may include either a racing program alone, or it may include both a racing program and a car-management program.
The multiple processors may be identical to one another (a homogeneous environment) or of different types (a heterogeneous environment). By way of example, in a heterogeneous environment, the processors may differ with respect to the set of microcode instructions that the processors are capable of executing.
Programmers typically use programs or routines called debuggers when writing programs for computers. Debuggers are used to assist programmers in preventing or remedying errors in applications, and they perform one or more of a variety of functions. For example, when a program is running, the debugger might allow a programmer to check on the data values (whether the values are stored in registers, RAM or any other memory) used by the program so that the programmer can examine potential anomalies (like a car whose position indicates the car is below the surface of the road). By further way of example, a debugger may allow a programmer to halt or break a running program at particular steps. The break may be absolute (e.g., whenever the processor encounters a break instruction) or conditional (e.g., whenever the memory associated with a car's altitude indicates that it is below the surface of the road). Other debugger functions will also be apparent to those of ordinary skill in the art.
When programs run on a computer with a relatively large amount of processing power and memory, such as many personal computers sold today, the debuggers often run on the same processor as the program they are debugging. However, there are instances where it is undesirable to run a debugger on the same processor as the program to be debugged.
For example, embedded systems such as personal digital assistants (PDAs) may have limited processing power to run both the debugger and the program to be debugged at the same time. Other systems such as gaming systems may have additional constraints, for example, the need to evaluate the performance of a game without hampering the performance of the game device by running a full debugger and game at the same time.
Heterogeneous multiprocessor environments provide additional challenges. The most effective debuggers are able to run natively on the same processor as the program to be debugged. Accordingly, when a multiprocessing system contains different types of processors, typical debuggers have required the user programmer to manually start, stop and manage multiple debuggers running at the same time even if the debuggers are shown in the same GUI. This can become extremely challenging when a program is simultaneously executing three or more processes on three or more different types of processors. The challenge is particularly difficult when the tasks of an application are relatively short-lived, that is, they may be spawned and terminated on a processor within a very short period of time.
Accordingly, there is a need for a system and method which permits a more advantageous debugging of programs in a heterogeneous multiprocessor environment.